<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文章内容</title>
</head>
<script src="../js/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="../bootstrap-3.3.7-dist/css/bootstrap.min.css">
<script src="../bootstrap-3.3.7-dist/js/bootstrap.js"></script>
<body>

<div class="container">
    <h3> <a href="/">首页</a>    </h3>


    <!-- //页头-->
    <div class="page-header">
        <h1>
            <%= data.title%>
            <small><%= data.intro%></small>

        </h1>

    </div>

    <div>分类: <span class="label label-default"><%= data.sort%></span></div>

    <p>作者:<%= data.author%></p>
    <p>日期:<%= data.date%></p>
    <div class="well">
       <h2><%= data.content%></h2>

    </div>

    <div class="page-header">

        <h1>评论</h1>
    </div>
    <% comment.forEach(function(e){ %>
        <div class="panel panel-default">
            <div class="panel-body">
                <strong><%= e.content %></strong>
            </div>
            <div class="panel-footer">
                <%= e.author %> - <%= e.date %>
            </div>
        </div>
    <% }) %>

      <div class="page-header">
          <h3>我也想发表我的评论</h3>


          <form method="post" action="/submitComment?_id=<%= data._id%>">
              <div class="form-group">
                  <label for="exampleInputEmail1">你的邮箱</label>
                  <input type="email" class="form-control" id="exampleInputEmail1" name="email"  placeholder="Email">
              </div>

              <div class="form-group">
                  <textarea class="form-control" rows="3" name="content" ></textarea>
              </div>
              <div class="checkbox">
                  <label>
                      <input type="checkbox"> Check me out
                  </label>
              </div>
              <button type="submit" class="btn btn-default" id="submit">Submit</button>
          </form>

      </div>

</div>


</body>
</html>